import Vue from 'vue'
import Router from 'vue-router'
import login from './views/after/login.vue'
import show from './views/after/show.vue'
import PunchWay from './views/after/chy/PunchWay.vue'
Vue.use(Router)
const originalPush = Router.prototype.push
Router.prototype.push = function push (location) {
  return originalPush.call(this, location).catch(err => err)
}
export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/test1',
      name: 'test1',
      // meta: {
      //   keepAlive: true, //该字段表示该页面需要缓存
      // },
      component: () => import(/* webpackChunkName: "about" */ './views/after/test1.vue')
    },
    {
      path: '/show',
      name: 'show',
      component: show,

      children: [
        {
          path: '/PunchWay',
          name: '打卡方式',
          component: PunchWay
        }
      ],
      meta: {
        requireAuth: true
      },
    },
    {
      path: '/shows',
      name: 'shows',
      // component: show,
      component: () => import('@/views/lyj/shebao/Toubao.vue'),
    },




    {path: '/s', name: '社保公积金', component: show,
      children: [
        {path: 'fileList', name:"f", component: () => import('@/views/lyj/shebao/FileList.vue')},
        {path: 'toubao/:sid', name:"t", component: () => import('@/views/lyj/shebao/Toubao.vue'),hidden:true},
      ]
    },
    {path: '/money', name: '工资条', component: show,
      children: [
        {path: 'moneyList', name:"g", component: () => import('@/views/lyj/money/List.vue')},
      ]
    },
    {path: '/mine', name: '会议室', component: show,
      children: [
        {path: 'conferenceList', name:"会议室列表", component: () => import('@/views/lyj/mine/conferenceList.vue')},
        {path: 'mineList', name:"我的会议列表", component: () => import('@/views/lyj/mine/mineList.vue')},
        {path: 'mineAdd', name:"会议添加", component: () => import('@/views/lyj/mine/mineDetails.vue')},
        {path: 'mineDetails/:mid', name:"会议编辑", component: () => import('@/views/lyj/mine/mineDetails.vue')},
      ]
    },
    // {path: '/e', name: '考试管理',component: show,
    //   children: [
    //     {path: 'exammys',name: '我的成绩',component: () => import('@/views/lyj/FileList.vue')},
    //     // {path: 'exam',name: 'ExamOnline',name: '在线考试',component: () => import('@/views/exam/examine/Exam.vue')},
    //     // {path: 'examQuestion', name: 'examQuestion', component: () => import('@/views/exam/qu/list.vue')},
    //     // {path: 'exams', name: '试卷管理', component: () => import ('@/views/exam/exam/Exam.vue')},
    //     // {path: 'repo', name: '题库管理', component: () => import('@/views/exam/repo/Repo.vue')},
    //
    //
    //   ]
    // },

  ]
})
